package cn.jiyun.service.impl;

import cn.jiyun.dao.UserDao;
import cn.jiyun.pojo.Permission;
import cn.jiyun.pojo.Role;
import cn.jiyun.pojo.User;
import cn.jiyun.serivce.UserService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findUserByUsername(String username) {
        return userDao.findUserByUsername(username);
    }

    @Override
    public List<Role> findRoleByUid(Integer id) {
        return userDao.findRoleByUid(id);
    }

    @Override
    public List<Permission> findPermissionByRid(Integer id) {
        return userDao.findPermissionByRid(id);
    }
}
